package com.harry.controller;

import com.harry.service.DoctorService;
import com.harry.service.OtherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/other/")
public class OtherController
{
    @Autowired
    OtherService otherService;

    @GetMapping("/registerUser/{role}/{open_id}/{name}/{age}/{phoneNumber}")
    public String registerUser(@PathVariable String age, @PathVariable String name, @PathVariable String open_id, @PathVariable String phoneNumber, @PathVariable String role)
    {
        return otherService.registerUser(age, name, open_id, phoneNumber, role);
    }

    @GetMapping("/forwardStage/{open_id}")
    public void forwardStage(@PathVariable String open_id)
    {
        otherService.forwardStage(open_id);
    }
}
